package com.yf.tz.dao;

import com.yf.tz.entity.MallGoodsEntity;
import org.apache.ibatis.annotations.Mapper;
import com.yf.dao.BaseDao;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 产品Dao
 *
 * @author hxf
 * @email 505860922@qq.com
 * @date Wed Jul 01 16:32:18 CST 2020
 */
@Mapper
public interface MallGoodsDao extends BaseDao<MallGoodsEntity> {


    /**

        List<MallGoodsVo> queryListVo(MallGoodsVo mallGoodsVo);

        MallGoodsVo getVo(Long id);

    **/

    List<MallGoodsEntity> findTop();


    List<MallGoodsEntity> findByTypeId(Long typeId);

    List<MallGoodsEntity> findByTypeAndName(Long typeId, String name);

    void decreaseStock(@Param("id") Long id, @Param("number") Integer number);

    void increaseStock(@Param("id") Long id, @Param("number") Integer number);
}
